package cn.rongdao.jrkabao.model.deposit;

import com.mifengkong.frtools.http.request.HttpFunction;
import com.mifengkong.frtools.util.FRString;

import cn.rongdao.jrkabao.bean.deposit.DepositBean;
import cn.rongdao.jrkabao.model.api.BaseKaMaoModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2017/7/31
 */

public class DepositModel extends BaseKaMaoModel {

    public static DepositModel getInstance() {
        return getPresent(DepositModel.class);
    }

    public void execute(String amount, Observer<DepositBean> observer) {
        addParamStrings("amount", FRString.valueOf(amount));
        Observable<DepositBean> observable = mServletApi.goDeposit(mParams).map(new HttpFunction<DepositBean>());
        toSubscribe(observable, observer);
    }
}
